package com.burger.counter.jspValidation;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Hashtable;

public class PickUpDateValidation {
	private String date;
	private String time;
	private Hashtable<String,String> errors;
	
	public PickUpDateValidation()
	{
		date="";
		time="";
		errors = new Hashtable<String,String>();
	}
	public void setDate(String date) {
		this.date = date;
	}
	public String getDate() {
		return date;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public String getTime() {
		return time;
	}
	public String getErrorMsg(String s) 
	{
		String errorMsg =(String)errors.get(s.trim());
		return (errorMsg == null) ? "":errorMsg;
	}
	public boolean validateDate(String date)
	{
		boolean bool=true;
		if(date.equals(""))
		{
			errors.put("dateOfBirth","Please enter your DateOfBirth");
			bool = false;
		}
		if(time.equals(""))
		{
			errors.put("dateOfBirth","Please enter your DateOfBirth");
			bool = false;
		}
		return bool;
	}
	
}
